<!-- 收货地址 -->
<template>
	<view class="container">
		<view class="content">
			<view class="name-and-phone">
				<text class="iconfont">&#xe622;</text>
				<text class="name">张三</text>
				<text class="phone">13812345678</text>
			</view>
			<view class="address-box">
				<text class="address">广州市天河区东圃百合苑3号楼1505</text>
				<!-- <button class="nav-btn btn-transition-scale95" @click="handleOpenLocation()">
					<text class="iconfont">&#xe623;</text>
					<text class="text">导航</text>
				</button> -->
			</view>
		</view>
	</view>
</template>

<script setup>
	const handleOpenLocation = () => {
		uni.openLocation({
			latitude: 23.117882,
			longitude: 113.405392,
			name: '测试',
			address: '广州市天河区东圃百合苑3号楼1505',
			success: function() {
				console.log('success');
			}
		});
	}
</script>

<style lang="scss" scoped>
	.container {
		padding: 24rpx 25rpx 30rpx;
	}

	.content {
		background-color: white;
		border-radius: 20rpx;
		padding: 30rpx 24rpx 30rpx 60rpx;

		.name-and-phone {
			position: relative;
			display: flex;
			align-items: center;

			.iconfont {
				position: absolute;
				top: 0;
				left: -36rpx;
				font-size: 30rpx;
				line-height: 42rpx;
			}

			.name {
				font-weight: bold;
				font-size: 28rpx;
				color: #222222;
				line-height: 1.5;
			}

			.phone {
				font-size: 28rpx;
				color: #999999;
				line-height: 1.5;
				margin-left: 30rpx;
			}
		}

		.address-box {
			display: flex;
			align-items: flex-end;

			.address {
				flex-grow: 1;
				width: 0;
				font-size: 24rpx;
				color: #999999;
				overflow: hidden;
				text-overflow: ellipsis;
				white-space: nowrap;
			}

			.nav-btn {
				display: flex;
				align-items: center;
				justify-content: center;
				width: 128rpx;
				height: 54rpx;
				border-radius: 27rpx;
				background-color: transparent;
				
				&::after {
					display: block;
					border: 1px solid #E5E5E5;
					border-radius: 36px;
				}

				.iconfont {
					font-size: 20rpx;
					color: #333333;
				}

				.text {
					font-size: 22rpx;
					color: #222222;
					margin-left: 6rpx;
				}
			}
		}
	}
</style>